import { defineStore } from 'pinia';

export const useAuthStore = defineStore('auth', {
  state: () => ({
    token: '', // 初始化为空字符串
    isSuper:false,
    canEmployee:false,
    canShop:false,
    canData:false
  }),
  actions: {
    setToken(token: string) {
      this.token = token;
    },
    clearToken() {
      this.token = '';
    },
  },
  persist: true
});